package com.yanqu.road.entity.activity.recallplayer.data;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.player.UserBaseInfo;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 用户回归类 记录邀请的玩家
 */

@FieldTypeAnnotation(tableName = "t_u_recall_other_data")
public class UserRecallOtherData extends DataObject {
    @FieldTypeAnnotation(select = true, update = true, isIndex = true)
    private long userId;
    @FieldTypeAnnotation(update = true, isIndex = true, desc = "被召回的玩家id")
    private long recallUserId;
    @FieldTypeAnnotation(desc = "被召回的玩家区服id")
    private long recallUserServer;
    @FieldTypeAnnotation(desc = "玩家被召回时分级 vip或赚速")
    private int playerType;
    @FieldTypeAnnotation(desc = "开始绑定时间")
    private long recallTime;
    @FieldTypeAnnotation(desc = "被召回老玩家玩家任务数据")
    private List<RecallPlayerBeBindTaskValue> taskData;
    @FieldTypeAnnotation(desc = "被召回的玩家信息 登录才加载进module")
    private UserBaseInfo userBaseInfo;
    @FieldTypeAnnotation(desc = "是否在活跃玩家处初始化")
    private boolean hadInit;

    private boolean hasFinishTask;  //是否有完成任务 不入库 红点用


    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public long getRecallUserId() {
        return recallUserId;
    }

    public void setRecallUserId(long recallUserId) {
        if (this.recallUserId != recallUserId) {
            this.recallUserId = recallUserId;
            setOp(DataStatus.Update);
        }
    }

    public long getRecallUserServer() {
        return recallUserServer;
    }

    public void setRecallUserServer(long recallUserServer) {
        if (this.recallUserServer != recallUserServer) {
            this.recallUserServer = recallUserServer;
            setOp(DataStatus.Update);
        }
    }

    public int getPlayerType() {
        return playerType;
    }

    public void setPlayerType(int playerType) {
        if (this.playerType != playerType) {
            this.playerType = playerType;
            setOp(DataStatus.Update);
        }
    }

    public long getRecallTime() {
        return recallTime;
    }

    public void setRecallTime(long recallTime) {
        if (this.recallTime != recallTime) {
            this.recallTime = recallTime;
            setOp(DataStatus.Update);
        }
    }

    public List<RecallPlayerBeBindTaskValue> getTaskData() {
        return taskData;
    }

    public void setTaskData(List<RecallPlayerBeBindTaskValue> taskData) {
        if (null == taskData) {
            return;
        }
        if (this.taskData == null || !this.taskData.equals(taskData)) {
            this.taskData = taskData;
            setOp(DataStatus.Update);
        }
    }

    public UserBaseInfo getUserBaseInfo() {
        return userBaseInfo;
    }

    public void setUserBaseInfo(UserBaseInfo userBaseInfo) {
        this.userBaseInfo = userBaseInfo;
    }

    public boolean isHadInit() {
        return hadInit;
    }

    public void setHadInit(boolean hadInit) {
        if (this.hadInit != hadInit) {
            this.hadInit = hadInit;
        }
        setOp(DataStatus.Update);
    }

    public boolean isHasFinishTask() {
        return hasFinishTask;
    }

    public void setHasFinishTask(boolean hasFinishTask) {
        this.hasFinishTask = hasFinishTask;
    }
}
